package com.qf.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * 入门操作
 * @author zjw
 * @description
 * @date 2021/10/8$ 10:10$
 */
@Controller
public class TestController {

    // http://localhost:8080/xxx
    @RequestMapping(value = "/xxx")
    public ModelAndView test(){
        System.out.println("请求进入到TestController的test方法…………");
        ModelAndView mv = new ModelAndView();
        mv.addObject("name","Hello SpringMVC！！！");
        mv.setViewName("/test.jsp");
        return mv;
    }
}
